import sequelize from "../../database/sequelize";
import * as Sequelize from "sequelize";
import { Injectable } from "@nestjs/common";

@Injectable()
export class RankService {
  async ranksSendService():Promise<any|undefined>{
    const sql =
      `SELECT * FROM rank_list`;
    try {
      let rankList = (await sequelize.query(sql,{
        type: Sequelize.QueryTypes.SELECT,
        raw: true,
        logging: false
      }));
      return rankList;
    }catch (error) {
      console.error(error);
      return void 0;
    }
  }
}